Skip to content

fix(github): stop pr-build redirecting MSBuild output and fix cdk-preview jq - #44

Merged
ncipollina merged 1 commit into
mainfrom
fix/v11-ci-blockers
Oct 14, 2026
Merged

ncipollina merged 1 commit into
mainfrom
fix/v11-ci-blockers

Conversation

@ncipollina

Copy link
Copy Markdown
Collaborator

Summary

Two defects in #42/#43 found by the first real consumer run (sharedale/sharedale#97). The published v11.0 release and tag were withdrawn; this fix ships with the re-tagged v11.0.

  • pr-build: the publish folder was exported as an outputPath environment variable. MSBuild reads environment variables as properties, so every project in a multi-project solution built into that one folder and overwrote each other's files (e.g. appsettings.json), failing tests ("Hosting failed to start", unexpected 500s). The variable is now TEMPLATE_OUTPUT_PATH. This bug predates v11; single-project consumers never hit it.
  • cdk-preview: the contextFromDeployed lookup used capture($re)?.value, which jq 1.7.1 (the GitHub-hosted runner's version) rejects as a syntax error. It now uses first(.. | strings | capture($re)? | .value) (reproduced on jq 1.7.1; the new form extracts the deployed image tag).

Validation

sharedale/sharedale#97 pinned temporarily to this branch's head (2706c08), run 38496391691:

  • build / dotnet: success. Test DLLs run from each project's own bin/Release/net11.0; 1,342 tests, 0 failed.
  • build / node (web): success.
  • cdk-preview / deployed templates: success (OIDC role assumed; 3 templates fetched).
  • cdk-preview / diff: success (sharedale-development, sharedale-staging with the deployed image tag via contextFromDeployed, and sharedale-staging-dns each previewed).

actionlint: clean except the known $/.github/actions/... false positive.

🤖 Generated with Claude Code

…view jq

pr-build exported its publish folder as an `outputPath` environment variable.
MSBuild reads environment variables as properties, so every project in the
solution built into that one folder and multi-project solutions overwrote
each other's files (for example appsettings.json), failing their tests. The
variable is now TEMPLATE_OUTPUT_PATH.

cdk-preview's contextFromDeployed lookup used `capture($re)?.value`, which jq
1.7.1 (the GitHub-hosted runner's version) rejects as a syntax error. Use
`first(.. | strings | capture($re)? | .value)`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T01:53:18.890597Z 2706c08 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the type: fix Bug fix label Oct 14, 2026
@ncipollina
ncipollina merged commit 5b2db86 into main Oct 14, 2026
13 checks passed
@ncipollina
ncipollina deleted the fix/v11-ci-blockers branch October 14, 2026 01:54
ncipollina added a commit that referenced this pull request Oct 14, 2026
…tput paths

Part of the v11 migration (released as v11.1).

Fix #45: build-deploy exported its publish folder as an `outputPath`
environment variable (job env and $GITHUB_ENV). MSBuild reads environment
variables as properties, so every project in a multi-project solution built
into that folder. The variable is now TEMPLATE_OUTPUT_PATH, matching
pr-build (#44); the publish location is unchanged. A self-test guard fails if
any workflow exports an MSBuild output-path property again.

Implement #46: build-deploy no longer hard-codes the management-account role
and region. Callers pass roleArn (development, non-tag runs) and
productionRoleArn (production, tag runs), plus awsRegion (default
us-east-1). A composite action validates them and selects the role before
the build and before any credentials are requested; tag runs require
productionRoleArn and never fall back to roleArn. configure-aws-credentials
is pinned to a commit and masks the account ID. No IAM, trust, or
permission changes.

Callers moving build-deploy from v10 with runCdk: true pass roleArn and,
for tag runs, productionRoleArn; to keep the v10 behavior, pass
arn:aws:iam::403542860824:role/github-deploy-role for both and
awsRegion: us-east-1. Callers pinned to v10.x are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ncipollina added a commit that referenced this pull request Oct 14, 2026
…tput paths (#48)

* feat(github): configurable build-deploy roles and separate MSBuild output paths

Part of the v11 migration (released as v11.1).

Fix #45: build-deploy exported its publish folder as an `outputPath`
environment variable (job env and $GITHUB_ENV). MSBuild reads environment
variables as properties, so every project in a multi-project solution built
into that folder. The variable is now TEMPLATE_OUTPUT_PATH, matching
pr-build (#44); the publish location is unchanged. A self-test guard fails if
any workflow exports an MSBuild output-path property again.

Implement #46: build-deploy no longer hard-codes the management-account role
and region. Callers pass roleArn (development, non-tag runs) and
productionRoleArn (production, tag runs), plus awsRegion (default
us-east-1). A composite action validates them and selects the role before
the build and before any credentials are requested; tag runs require
productionRoleArn and never fall back to roleArn. configure-aws-credentials
is pinned to a commit and masks the account ID. No IAM, trust, or
permission changes.

Callers moving build-deploy from v10 with runCdk: true pass roleArn and,
for tag runs, productionRoleArn; to keep the v10 behavior, pass
arn:aws:iam::403542860824:role/github-deploy-role for both and
awsRegion: us-east-1. Callers pinned to v10.x are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(github): accept IAM role paths when validating role ARNs

The role-ARN check limited everything after `role/` to 64 characters, which
rejected valid roles with a path (IAM allows a path of up to 512 characters
plus a 64-character name) and path punctuation. Validate the partition,
account, path, and name separately in resolve-aws-deploy-role and
cdk-preview, and add self-test cases for path roles and the limits.

Addresses Codex review feedback on #48.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant